function seed_Ver(self,id,email) {
    button_disabled(self,"loading",1);
    layer.load(1, {
        shade: [0.1,'#fff'] //0.1透明度的白色背景
    });
    var url="/CenterInc/view_inc/Seed_email.aspx?mode="+id;
    if(email==1){
        var emailName=$("#NewEmail").val();
        url+="&emailName="+emailName;
    }
    $.get(url,function (data) {
        if(data["error"]!=undefined){
            button_disabled(self,"发送验证码",1);
            layer.closeAll('loading');
            layer.msg(data["error"], {icon: 5});
            return;
        }
        button_disabled(self,"发送验证码",1);
        layer.msg(data["msg"], {icon: 1});
        layer.closeAll('loading');
    });
}

function Update_Password(self) {
    var oldPassword=$("#oldPassword").val();
    var NewPassword = $("#NewPassword").val();
    var RePassword =$("#RePassword").val();
    var EmailVer=$("#VerText").val();
    if(NotEmpty(oldPassword,NewPassword,RePassword,EmailVer)){
        Popup.msg("不允许留空", {icon: 5});
        return;
    }
    if(RegChar(NewPassword)||RegChar(oldPassword)){
        Popup.msg("密码不允许oldPassword有特殊字符", {icon: 5});
        return;
    }
    if(NewPassword!=RePassword){
        Popup.msg("两次输入的密码必须相同", {icon: 5});
        return;
    }

    Popup.confirm('是否确认修改密码？', {
        btn: ['是','否'] //按钮
    }, function(){
        button_disabled(self,"loading",1);
        Popup.load(1, {
            shade: [0.1,'#fff'] //0.1透明度的白色背景
        });
        $.post("/CenterInc/view_inc/Safe_User_inc.aspx?mode=1",
            {oldPassword:oldPassword,
                newPassword:NewPassword,
                EmailVer:EmailVer
            },function (data) {
            console.log(data);
                if(data["error"]!=undefined){
                    button_disabled(self,"确认修改",2);
                    Popup.closeAll('loading');
                    Popup.msg(data["error"], {icon: 5});
                    return;
                }
                button_disabled(self,"确认修改",2);
                Popup.closeAll('loading');
                Popup.msg(data["msg"], {icon: 1});
                setTimeout("window.location.reload()",2000);
            });
    }, function(){
        button_disabled(self,"确认修改",2);
        Popup.closeAll('loading');
    });
}

function Update_Email(self) {
    var emailName=$("#NewEmail").val();
    var emailVer=$("#VerEmail").val();
    if(NotEmpty(emailName,emailVer)){
        Popup.msg("不允许留空", {icon: 5});
        return;
    }
    if(ReqEmailChar(emailName)){
        $('#emailVer').val("");
        Popup.msg("请输入正确的邮箱格式",{icon: 5});
        button_disabled(self,"发送",2);
        return;
    }
    Popup.confirm('是否确认修改邮箱？', {
        btn: ['是','否'] //按钮
    }, function(){
        button_disabled(self,"loading",1);
        Popup.load(1, {
            shade: [0.1,'#fff'] //0.1透明度的白色背景
        });
        $.post("/CenterInc/view_inc/Safe_User_inc.aspx?mode=2",
            {
                newEmail:emailName,
                EmailVer:emailVer
            },function (data) {
                console.log(data);
                if(data["error"]!=undefined){
                    button_disabled(self,"确认修改",2);
                    Popup.closeAll('loading');
                    Popup.msg(data["error"], {icon: 5});
                    return;
                }
                button_disabled(self,"确认修改",2);
                Popup.closeAll('loading');
                Popup.msg(data["msg"], {icon: 1});
                setTimeout("window.location.reload()",2000);
            });
    }, function(){
        button_disabled(self,"确认修改",2);
        Popup.closeAll('loading');
    });
}